/**
 * Created by HP on 2017/10/17.
 */
// var mongoose = require('mongoose');
// var mongoosePaginate = require('mongoose-paginate');
//
// var schema = mongoose.Schema;
// var UserSchema = new schema({
// 	name:String,
// 	password:String,
// 	date: { type: Date, default: Date.now }
// })
//
// UserSchema.plugin(mongoosePaginate);
//
// module.exports = mongoose.model('User',UserSchema,'user1');

var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');
var Schema = mongoose.Schema;
var ObjectId = Schema.ObjectId;

var schema = new mongoose.Schema({
	user:String,
	content:String,
	cateId:ObjectId
})

schema.plugin(mongoosePaginate);

var Commemt = mongoose.model('Commemt',schema,'commemt');
module.exports = Commemt;